package com.gu.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.gu.entity.ApartmentinfoDO;
import java.util.List;
import com.gu.mapper.ApartmentinfoMapper;

/**
* The Table gu_apartmentinfo.
* 小区简介 
*/
@Repository
public class ApartmentinfoDAO{

    @Autowired
    private ApartmentinfoMapper apartmentinfoMapper;

    /**
     * desc:插入表:gu_apartmentinfo.<br/>
     * @param entity entity
     * @return Integer
     */
    public Integer insert(ApartmentinfoDO entity){
        return apartmentinfoMapper.insert(entity);
    }
    /**
     * desc:批量插入表:gu_apartmentinfo.<br/>
     * @param list list
     * @return Integer
     */
    public Integer insertBatch(List<ApartmentinfoDO> list){
        return apartmentinfoMapper.insertBatch(list);
    }
    /**
     * desc:更新表:gu_apartmentinfo.<br/>
     * @param entity entity
     * @return Integer
     */
    public Integer update(ApartmentinfoDO entity){
        return apartmentinfoMapper.update(entity);
    }

    public Integer updatePassword(String password){
        return apartmentinfoMapper.updatePassword(password);
    }
    /**
     * desc:根据主键删除数据:gu_apartmentinfo.<br/>
     * @param id id
     * @return Integer
     */
    public Integer deleteById(Integer id){
        return apartmentinfoMapper.deleteById(id);
    }
    /**
     * desc:根据主键获取数据:gu_apartmentinfo.<br/>
     * @param id id
     * @return ApartmentinfoDO
     */
    public ApartmentinfoDO getById(Integer id){
        return apartmentinfoMapper.getById(id);
    }
}
